<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<!-- BEGIN HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN CONTAINER -->
	<!-- BEGIN CONTENT -->
	<div ng-controller="serviceInfoManagementController">
		<div class="table_btn_box">
			<a class="btn blue" onClick="tableAdd(this,'editData');" ng-click="addInit();"><i class="fa fa-plus"></i>新增</a>
		</div>
		<table class="table table-striped table-bordered table-hover" id="table_1">
			<thead>
				<tr>
					<th>服务编号</th>
					<th>服务名称</th>
					<th>父服务名称</th>
					<th>是否可用</th>
					<th>是否虚拟服务</th>
					<th>虚拟服务编号</th>
					<th>是否有效</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr class="odd gradeX" ng-repeat="l in showList track by $index" on-loaded="{{$last}}" target-table="table_1">
					<td><span ng-bind="l.serviceNo"></span></td>
					<td><span ng-bind="l.name"></span></td>
					<td><span ng-bind="l.parentName"></span></td>
					<td ng-switch on="l.isCanUse">
						<span ng-switch-when="1" >可用</span>
						<span ng-switch-when="0" >不可用</span>
					</td>
					<td ng-switch on="l.isVirtual">
						<span ng-switch-when="1" >是</span>
						<span ng-switch-when="0" >否</span>
					</td>
					<td><span ng-bind="l.virtualNo"></span></td>
					<td ng-switch on="l.isValid">
						<span ng-switch-when="1" >是</span>
						<span ng-switch-when="0" >否</span>
					</td>
					<td>
						<a class="btn" data-target="#editData" data-toggle="modal" ng-click="setInit(l);">修改</a>
						<a class="btn" ng-click="delInit(l);">删除</a>
					</td>
				</tr>
			</tbody>
		</table>
<div id="editData" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h4 class="modal-title" ng-bind="openTitle"></h4>
			</div>
			<div class="modal-body form">
				<div class="form-group">
					<div class="row">
						<label class="col-sm-2 control-label text-right">父服务</label>
						<div class="col-sm-10">
							<div class="input-group">
								<select class="form-control"
									ng-options="subject.serviceNo as subject.name  for subject in showList "
									ng-model="edit.parentNo">
									<option value="">--请选择父服务--</option>
								</select>
							</div>
						</div>
					</div>
					<div class="row">
						<label class="col-sm-2 control-label text-right">服务名称</label>
						<div class="col-sm-10">
							<div class="input-group"><input ng-model="edit.name" type="text" class="form-control bValidate" key="required,range_1-32"/></div>
						</div>
					</div>
					<hr />
					<div class="row">
						<label class="col-sm-2 control-label text-right">有效标识</label>
						<div class="col-md-3">
							<div class="radio-list">
								<label class="radio-inline"><input type="radio" ng-model="edit.isValid" ng-selected="edit.isValid==1" name="isValid" value="1">是</label>
								<label class="radio-inline"><input type="radio" ng-model="edit.isValid" ng-selected="edit.isValid==0" name="isValid" value="0">否</label>
							</div>
						</div>
						<label class="col-sm-3 control-label text-right" title="对所有用户是否默认可用">是否默认可用</label>
						<div class="col-md-4" title="对所有用户是否默认可用">
							<div class="radio-list">
								<label class="radio-inline"><input type="radio" ng-model="edit.isCanUse" ng-selected="edit.isCanUse==1" name="isCanUse" value="1">可用</label>
								<label class="radio-inline"><input type="radio" ng-model="edit.isCanUse" ng-selected="edit.isCanUse==0" name="isCanUse" value="0">不可用</label>
							</div>
						</div>
					</div>
					<hr />
					<div class="row">
						<label class="col-sm-2 control-label text-right">虚拟服务</label>
						<div class="col-md-3">
							<div class="radio-list">
								<label class="radio-inline"><input type="radio" ng-model="edit.isVirtual" ng-selected="edit.isVirtual==1" name="isVirtual" value="1">是</label>
								<label class="radio-inline"><input type="radio" ng-model="edit.isVirtual" ng-selected="edit.isVirtual==0" name="isVirtual" value="0">否</label>
							</div>
						</div>
						<span ng-show="edit.isVirtual==0">
							<label class="col-sm-3 control-label text-right">对应的虚拟服务</label>
							<div class="col-sm-4">
								<div class="input-group">
									<select class="form-control"
										ng-options="subject.serviceNo as subject.name for subject in selectList "
										ng-model="edit.virtualNo">
										<option value="">-选择虚拟服务-</option>
									</select>
								</div>
							</div>
						</span>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
				<button type="submit" class="btn btn-primary" ng-click="editData();"><i class="fa fa-check"></i>保存</button>
			</div>
		</div>
	</div>
</div>
</div>
	<!-- END CONTENT -->
<!-- END CONTAINER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
</body>
<!-- END BODY -->
</html>